package com.mikelouis.test.scala.proginscala.chapter27.recipe

/**
 * Created by yuazhu on 2/25/2015.
 */
object StudentDatabase extends Database {

  object FrozenFood extends Food("FrozenFood")

  object HeatItUp extends Recipe(
    "heat it up",
    List(FrozenFood),
    "Microwave the \'food\' for 10 minutes.")

  def allFoods = List(FrozenFood)

  def allRecipes = List(HeatItUp)

  def allCategories = List(
    FoodCategory("edible", List(FrozenFood)))
}

object StudentBrowser extends Browser {
  val database = StudentDatabase

  def main(args: Array[String]) {
    val frozen = StudentDatabase.foodNamed("FrozenFood").get
    println(recipesUsing(frozen))

  }
}
